/* rope = string with holes     GCW 25/04/2021  */

#ifndef _class_rope
#define _class_rope 1
#endif

class rope  { hd; tl; }

rope::rope(head,tail) { hd = head; tl = tail; return this; }

rope::h ( ) { return hd; }
rope::t ( ) { return tl; }

rope::write(fp)
{ local h, t ;
 h = this->h( );  t = this->t();
 if (typeof(h)) fp << h;
 if (typeof(t))  t->write(fp);
 }

rope::len ( )
{ local h, t;
  h = this->h(); t = this->t();
  return (typeof(t)?((t->len()) + 1):1);
}
